import numpy as np
import math


def softmax(scores: list[float]) -> list[float]:
    # 防止数值溢出，减去最大值
    exp_scores = np.exp(scores - np.max(scores))
    # 计算概率分布
    probabilities = exp_scores / np.sum(exp_scores)
    # 保留4位小数并转为列表
    return np.round(probabilities, 4).tolist()


if __name__ == "__main__":
    scores = np.array(eval(input()))
    print(softmax(scores))
